package Text_51;

import java.util.Scanner;

public class Code {

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
	        System.out.println("请输入[−2^31,  2^31 − 1]内的整数：");
	        int num = sc.nextInt();
	        int num1 = getNum(num);
	    }
	    public static  int  getNum( int num){
	        int num1 = num;
	        int sum = 0;
	        if(num1<0){
	            num1 = num1*(-1);
	        }
	        if(num1>=0){
	            while(num1>=1){
	                int ge = num1%10;
	                num1 = num1/10;
	                sum = ge+sum*10;
	            }
	        }
	        if(num<0){
	            System.out.println("-"+sum);
	        }else
	        System.out.println(sum);
	        return sum;

	}

}
